import unittest
from api.login import LoginAPI
import utils
from parameterized import parameterized


class TestLoginAPI(unittest.TestCase):
    def setUp(self) -> None:
        self.login_api = LoginAPI()

    def tearDown(self) -> None:
        pass

    @parameterized.expand(utils.read_json())
    def test_login(self, login_data, status_code, success, code, message):
        response = self.login_api.login(login_data)
        utils.assertion(self, response, status_code, success, code, message)
